#include <stdio.h>
#include <stdlib.h>

int main (int argc, char const* argv[])
{
    int n, c, i, j, a[1024], t;

    scanf("%d", &n);
    while (n--) {
        scanf("%d", &c);

        for (i = 0; i < c; i++) {
            scanf("%d", &a[i]);
        }

        for (i = 0; i < c-1; i++) {
            for (j = i+1; j < c; j++) {
                if (a[i] > a[j]) {
                    t = a[i]; a[i] = a[j]; a[j] = t;
                }
            }
        }

        printf("%d", a[0]);
        for (i = 1; i < c; i++) {
            printf(" %d", a[i]);
        }
        printf("\n");
    }

    return 0;
}
